Skip to content

fix: refuse a blank --tool instead of sending without a tool - #80

Merged
youdie006 merged 2 commits into
mainfrom
fix/blank-tool
Oct 30, 2026
Merged

youdie006 merged 2 commits into
mainfrom
fix/blank-tool

Conversation

@youdie006

Copy link
Copy Markdown
Owner

Problem

--tool " " (a tool name of only spaces, such as an empty script variable) was accepted. The prompt went out with no tool and no warning (measured 2026-10-29). MCP pro_consult passes its tools to the CLI as --tool, so a blank entry there did the same.

Change

A blank --tool value now stops the send before the browser: "--tool is blank; name a composer tool (web-search, create-image), or leave the option out." This matches how blank --project / --project-new are already refused. An empty string was already refused as "--tool requires a value".

Verification

  • tsc --noEmit, npm run build, npm test: 1844 passed, 3 skipped.
  • New tests in tests/cli-pro-browser-send.test.ts (spaces, tab) and tests/mcp-consult.test.ts (MCP tools: [" "]). All fail without the change: the send was reached.
  • Built CLI: prodex ask --tool " " ... exits 1 with the message, and no browser send lock is taken.

`--tool "  "` (an empty script variable, say) was accepted, and the prompt
went out with no tool and no warning (measured 2026-10-29). MCP
pro_consult passes its tools as --tool, so a blank entry there did the
same. A tool is opened by its label, so a value of only spaces names
none; the send now stops before the browser with "--tool is blank".

Verified: tsc, build, npm test (1844 passed, 3 skipped). The new CLI and
MCP tests fail without the change. The built CLI refuses `--tool "  "`
with exit 1 and never takes the browser send lock.

Claude-Session: https://claude.ai/code/session_01EMqNwnnhHXznd2P2PDsaDV
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

What this touches

  • CLI
  • tests

4 file(s), 30 line(s) changed. Tests changed.

This is an automated first pass, not a review. CI is the gate; a person decides.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T08:17:11.285409Z 4d038b6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@youdie006
youdie006 merged commit e6ed911 into main Oct 30, 2026
7 checks passed
youdie006 added a commit that referenced this pull request Oct 30, 2026
A blank --tool (or a blank MCP pro_consult tools entry) was accepted and
the prompt went out with no tool. It now stops before the browser with
"--tool is blank". The patch from main applied as-is.

Verified: tsc, build, npm test.

Claude-Session: https://claude.ai/code/session_01EMqNwnnhHXznd2P2PDsaDV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant